package com.work.dao;

import com.work.pojo.Goods;
import com.work.utils.DBUtil;

import java.util.List;

public class GoodsDaoImpl extends DBUtil implements GoodsDao {
    @Override
    public List<Goods> queryAllGoods() {
        String sql="select * from goods";
        return super.executeQueryList(sql, Goods.class);
    }

    @Override
    public Goods queryGoodById(int goods_id) {
        String sql="select * from goods where goods_id= ?";
        return super.executeQueryOne(sql, Goods.class,goods_id);
    }
}
